let { projectRootPath } = require("../../../util/index");
let { getNewRouter } = require(`${projectRootPath}/app/index.js`);
let { signToken, verifyToken } = require(
  `${projectRootPath}/util/jwt/index.js`,
);
let app = getNewRouter();
let { admin } = require(`${projectRootPath}/config/index.js`);
let { getUserByUsername, editUserByUuid, getUserByAll } = require(
  `${projectRootPath}/service/user/index.js`,
);

let { question } = require(`${projectRootPath}/config/index.js`);
// 获取配置
app.post("/get/question", async (req, res) => {
  try {
    res.send({ data: question, code: 20000 });
  } catch (error) {
    res.send({ data: {}, message: error.message, code: 20001 });
  }
});

module.exports = app;
